package com.company.test24;


/**
 * Created by Administrator on 2016.10.20.
 */
public class Test2405 {
    public static <E extends Comparable<E>> void heapSort(E[] list){
        Heap<E> heap=new Heap<E>();

        for(int i=0;i<list.length;i++){
            heap.add(list[i]);
        }

        for(int i=0;i<list.length;i++){
            list[i]=heap.remove();
        }
    }
}
